Rails.application.routes.draw do
  get 'upload_file/index'

  get 'upload_file/new'

  get 'upload_file/create'

  get 'upload_file/destroy'

  root 'home#index'

  get 'deploy/:appId' => 'deploy#to_deploy'
  post 'deploy/:appId' => 'deploy#deploy'
  get 'deploy/rollback/:appId' => 'deploy#to_rollback'
  post 'deploy/rollback/:appId' => 'deploy#rollback'
  get 'deploy/restart/:appId' => 'deploy#to_restart'
  post 'deploy/restart/:appId' => 'deploy#restart'
  get 'deploy/start/:appId' => 'deploy#to_start'
  post 'deploy/start/:appId' => 'deploy#start'
  get 'deploy/stop/:appId' => 'deploy#to_stop'
  post 'deploy/stop/:appId' => 'deploy#stop'
  get 'deploy/status/:appId' => 'deploy#to_status'
  post 'deploy/status/:appId' => 'deploy#status'
  get 'deploy/view_version/:appId' => 'deploy#to_view_version'
  post 'deploy/view_version/:appId' => 'deploy#view_version'

  get 'deploy_history' => 'deploy_history#index'
  get 'deploy_history/quick_index'
  get 'deploy_history/quick_index1' => 'deploy_history#quick_index'
  get 'deploy_history/:id' => 'deploy_history#show_log'

  #注册
  get 'register' => 'user#new'
  post 'register' => 'user#create'

  #登录
  get 'login' => 'login#to_login'
  post 'login' => 'login#login'
  get 'logout' => 'login#logout'

  #数据库部分
  get 'sql_order' => 'sql_order#index'
  get 'sql_order/:db_name' => 'sql_order#show'
  post 'sql_order/:db_name' => 'sql_order#new'
  get 'sql_order/upload_file/:db_name' => 'sql_order#file_new'
  post 'sql_order/upload_file/:db_name' => 'sql_order#upload'

  get 'sql_history' => 'sql_history#index'
  get 'sql_history/:id' => 'sql_history#details'
  post 'sql_history/:id' => 'sql_history#details'
  get 'sql_history/report/:id' => 'sql_history#show_report'
  post 'sql_history/report/:id' => 'sql_history#show_report'
  get 'sql_history/auditor_succeed/:id' => 'sql_history#auditor_succeed'
  get 'sql_history/auditor_fail/:id' => 'sql_history#auditor_fail'
  get 'sql_history/execute_now/:id' => 'sql_history#execute_now'
  get 'sql_history/cancel/:id' => 'sql_history#cancel'


end
